#include  <iostream>
using  namespace  std;

int fun(int a)
{
    if(a<=0)
        throw 1;
    else if(a<=5)
        throw 2.5;
    else if(a<=10)
        throw 'h';
    else
        return a*a;
}
int main()
{
    int x;
    cin>>x;
    try
    {
        cout << "fun(20) = "<< fun(20) <<endl;
        cout << "fun(x) = " << fun(x) <<endl;
    }
    catch(int)
    {
         cout<<"throw int 错误！"<<endl;
    }
    catch(double)
    {
         cout<<"throw double 错误！"<<endl;
    }
    catch(...)
    {
         cout<<"throw else type错误！"<<endl;
    }
    cout<<"end!"<<endl;
    return 0;
}
